package com.xxx.yuedong.campaign.service.impl;

import com.xxx.yuedong.campaign.db.dao.RunDao;
import com.xxx.yuedong.campaign.pojo.Run;
import com.xxx.yuedong.campaign.service.RunService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * @author hc
 * @date 2023/08/03 11:51
 **/


@Service
public class RunServiceImpl implements RunService {
    @Autowired
    private RunDao runDao;

    @Override
    public int insert(Run run) {
        int rows = runDao.insert(run);
        return rows;
    }

    @Override
    public HashMap searchRunById(long id) {
        HashMap map = runDao.searchRunById(id);
        return map;
    }

    @Override
    public ArrayList<HashMap> selectRunList(long id) {
        ArrayList<HashMap> list = runDao.selectRunList(id);
        return list;
    }

    @Override
    public int delete(long id) {
        int rows = runDao.delete(id);
        return rows;
    }
}
